﻿Imports Microsoft.VisualBasic

Namespace My
    <Serializable()> _
    Public Structure VolunteerStatus
        Public Shared Approving As New VolunteerStatus("1")
        Public Shared Approved As New VolunteerStatus("2")
        Public Shared Rejected As New VolunteerStatus("3")
        Public Shared VBooked As New VolunteerStatus("Y")

        Private statusField As String

        Public ReadOnly Property Status() As String
            Get
                Return Me.statusField
            End Get
        End Property

        Public Sub New(ByVal status As String)
            Me.statusField = status
        End Sub

        Public Shared Operator =(ByVal value1 As VolunteerStatus, ByVal value2 As VolunteerStatus) As Boolean
            If value1.Status = value2.Status Then
                Return True
            Else
                Return False
            End If
        End Operator

        Public Shared Operator <>(ByVal value1 As VolunteerStatus, ByVal value2 As VolunteerStatus) As Boolean
            If value1.Status <> value2.Status Then
                Return True
            Else
                Return False
            End If
        End Operator

        Public Shared Operator =(ByVal value1 As String, ByVal value2 As VolunteerStatus) As Boolean
            Return value1 = value2.Status
        End Operator

        Public Shared Operator <>(ByVal value1 As String, ByVal value2 As VolunteerStatus) As Boolean
            Return value1 <> value2.Status
        End Operator

        Public Overrides Function ToString() As String
            Return Me.Status
        End Function
    End Structure
End Namespace

